package internal

import (
	"github.com/gin-gonic/gin"
	"talent.com/server/durotar.git/log"
)

var (
	engine = gin.Default()
)

type Module struct {
	*gin.Engine
}

func (m *Module) OnInit() {
	m.Engine = engine
}

func (m *Module) Run(closeSig chan bool) {
	go m.Engine.Run()
	<-closeSig
	log.Info("-------> exit http server")
}

func (m *Module) OnDestroy() {
}
